package com.hudilao.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * Stock类，表示库存实体
 */
@Data
@TableName("stock")
public class Stock implements Serializable {

    //库存项id
    @TableId
    private Long id;

    //库存对应的菜品id
    private Long dishId;

    //库存对应的菜品名称
    private String dishName;

    //库存总数量
    private Integer quantity;

    //库存创建时间
    //插入时填充字段
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    //库存最新更新时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}
